
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>dislocation_monopole calculation style &#8212; iprPy 0.10.2 documentation</title>
    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="dislocation_periodic_array calculation style" href="dislocation_periodic_array.html" />
    <link rel="prev" title="dislocation_SDVPN calculation style" href="dislocation_SDVPN.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dislocation_periodic_array.html" title="dislocation_periodic_array calculation style"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="dislocation_SDVPN.html" title="dislocation_SDVPN calculation style"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">iprPy 0.10.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../notebook_styles.html" accesskey="U">Jupyter Demonstration Notebooks</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  
<style>
/* CSS for nbsphinx extension */

/* remove conflicting styling from Sphinx themes */
div.nbinput.container,
div.nbinput.container div.prompt,
div.nbinput.container div.input_area,
div.nbinput.container div[class*=highlight],
div.nbinput.container div[class*=highlight] pre,
div.nboutput.container,
div.nboutput.container div.prompt,
div.nboutput.container div.output_area,
div.nboutput.container div[class*=highlight],
div.nboutput.container div[class*=highlight] pre {
    background: none;
    border: none;
    padding: 0 0;
    margin: 0;
    box-shadow: none;
}

/* avoid gaps between output lines */
div.nboutput.container div[class*=highlight] pre {
    line-height: normal;
}

/* input/output containers */
div.nbinput.container,
div.nboutput.container {
    display: -webkit-flex;
    display: flex;
    align-items: flex-start;
    margin: 0;
    width: 100%;
}
@media (max-width: 540px) {
    div.nbinput.container,
    div.nboutput.container {
        flex-direction: column;
    }
}

/* input container */
div.nbinput.container {
    padding-top: 5px;
}

/* last container */
div.nblast.container {
    padding-bottom: 5px;
}

/* input prompt */
div.nbinput.container div.prompt pre {
    color: #307FC1;
}

/* output prompt */
div.nboutput.container div.prompt pre {
    color: #BF5B3D;
}

/* all prompts */
div.nbinput.container div.prompt,
div.nboutput.container div.prompt {
    width: 4.5ex;
    padding-top: 5px;
    position: relative;
    user-select: none;
}

div.nbinput.container div.prompt > div,
div.nboutput.container div.prompt > div {
    position: absolute;
    right: 0;
    margin-right: 0.3ex;
}

@media (max-width: 540px) {
    div.nbinput.container div.prompt,
    div.nboutput.container div.prompt {
        width: unset;
        text-align: left;
        padding: 0.4em;
    }
    div.nboutput.container div.prompt.empty {
        padding: 0;
    }

    div.nbinput.container div.prompt > div,
    div.nboutput.container div.prompt > div {
        position: unset;
    }
}

/* disable scrollbars on prompts */
div.nbinput.container div.prompt pre,
div.nboutput.container div.prompt pre {
    overflow: hidden;
}

/* input/output area */
div.nbinput.container div.input_area,
div.nboutput.container div.output_area {
    -webkit-flex: 1;
    flex: 1;
    overflow: auto;
}
@media (max-width: 540px) {
    div.nbinput.container div.input_area,
    div.nboutput.container div.output_area {
        width: 100%;
    }
}

/* input area */
div.nbinput.container div.input_area {
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    background: #f5f5f5;
}

/* override MathJax center alignment in output cells */
div.nboutput.container div[class*=MathJax] {
    text-align: left !important;
}

/* override sphinx.ext.imgmath center alignment in output cells */
div.nboutput.container div.math p {
    text-align: left;
}

/* standard error */
div.nboutput.container div.output_area.stderr {
    background: #fdd;
}

/* ANSI colors */
.ansi-black-fg { color: #3E424D; }
.ansi-black-bg { background-color: #3E424D; }
.ansi-black-intense-fg { color: #282C36; }
.ansi-black-intense-bg { background-color: #282C36; }
.ansi-red-fg { color: #E75C58; }
.ansi-red-bg { background-color: #E75C58; }
.ansi-red-intense-fg { color: #B22B31; }
.ansi-red-intense-bg { background-color: #B22B31; }
.ansi-green-fg { color: #00A250; }
.ansi-green-bg { background-color: #00A250; }
.ansi-green-intense-fg { color: #007427; }
.ansi-green-intense-bg { background-color: #007427; }
.ansi-yellow-fg { color: #DDB62B; }
.ansi-yellow-bg { background-color: #DDB62B; }
.ansi-yellow-intense-fg { color: #B27D12; }
.ansi-yellow-intense-bg { background-color: #B27D12; }
.ansi-blue-fg { color: #208FFB; }
.ansi-blue-bg { background-color: #208FFB; }
.ansi-blue-intense-fg { color: #0065CA; }
.ansi-blue-intense-bg { background-color: #0065CA; }
.ansi-magenta-fg { color: #D160C4; }
.ansi-magenta-bg { background-color: #D160C4; }
.ansi-magenta-intense-fg { color: #A03196; }
.ansi-magenta-intense-bg { background-color: #A03196; }
.ansi-cyan-fg { color: #60C6C8; }
.ansi-cyan-bg { background-color: #60C6C8; }
.ansi-cyan-intense-fg { color: #258F8F; }
.ansi-cyan-intense-bg { background-color: #258F8F; }
.ansi-white-fg { color: #C5C1B4; }
.ansi-white-bg { background-color: #C5C1B4; }
.ansi-white-intense-fg { color: #A1A6B2; }
.ansi-white-intense-bg { background-color: #A1A6B2; }

.ansi-default-inverse-fg { color: #FFFFFF; }
.ansi-default-inverse-bg { background-color: #000000; }

.ansi-bold { font-weight: bold; }
.ansi-underline { text-decoration: underline; }


div.nbinput.container div.input_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight].math,
div.nboutput.container div.output_area.rendered_html,
div.nboutput.container div.output_area > div.output_javascript,
div.nboutput.container div.output_area:not(.rendered_html) > img{
    padding: 5px;
}

/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
div.nbinput.container div.input_area > div[class^='highlight'],
div.nboutput.container div.output_area > div[class^='highlight']{
    overflow-y: hidden;
}

/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
.prompt a.copybtn {
    display: none;
}

/* Some additional styling taken form the Jupyter notebook CSS */
div.rendered_html table {
  border: none;
  border-collapse: collapse;
  border-spacing: 0;
  color: black;
  font-size: 12px;
  table-layout: fixed;
}
div.rendered_html thead {
  border-bottom: 1px solid black;
  vertical-align: bottom;
}
div.rendered_html tr,
div.rendered_html th,
div.rendered_html td {
  text-align: right;
  vertical-align: middle;
  padding: 0.5em 0.5em;
  line-height: normal;
  white-space: normal;
  max-width: none;
  border: none;
}
div.rendered_html th {
  font-weight: bold;
}
div.rendered_html tbody tr:nth-child(odd) {
  background: #f5f5f5;
}
div.rendered_html tbody tr:hover {
  background: rgba(66, 165, 245, 0.2);
}
</style>
<div class="section" id="dislocation_monopole-calculation-style">
<h1>dislocation_monopole calculation style<a class="headerlink" href="#dislocation_monopole-calculation-style" title="Permalink to this headline">¶</a></h1>
<p><strong>Lucas M. Hale</strong>, <a class="reference external" href="mailto:lucas&#46;hale&#37;&#52;&#48;nist&#46;gov?Subject=ipr-demo">lucas<span>&#46;</span>hale<span>&#64;</span>nist<span>&#46;</span>gov</a>, <em>Materials Science and Engineering Division, NIST</em>.</p>
<div class="section" id="Introduction">
<h2>Introduction<a class="headerlink" href="#Introduction" title="Permalink to this headline">¶</a></h2>
<p>The dislocation_monopole calculation style calculation inserts a dislocation monopole into an atomic system using the anisotropic elasticity solution for a perfectly straight dislocation. The system is divided into two regions: a boundary region at the system’s edges perpendicular to the dislocation line, and an active region around the dislocation. After inserting the dislocation, the atoms within the active region of the system are relaxed while the positions of the atoms in the boundary
region are held fixed at the elasticity solution. The relaxed dislocation system and corresponding dislocation-free base systems are retained in the calculation’s archived record. Various properties associated with the dislocation’s elasticity solution are recorded in the calculation’s results record.</p>
<div class="section" id="Version-notes">
<h3>Version notes<a class="headerlink" href="#Version-notes" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p>2018-09-25: Notebook added</p></li>
<li><p>2019-07-30: Method and Notebook updated for iprPy version 0.9.</p></li>
<li><p>2020-09-22: Notebook updated to reflect that calculation method has changed to now use atomman.defect.Dislocation.</p></li>
</ul>
</div>
<div class="section" id="Additional-dependencies">
<h3>Additional dependencies<a class="headerlink" href="#Additional-dependencies" title="Permalink to this headline">¶</a></h3>
</div>
<div class="section" id="Disclaimers">
<h3>Disclaimers<a class="headerlink" href="#Disclaimers" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><a class="reference external" href="http://www.nist.gov/public_affairs/disclaimer.cfm">NIST disclaimers</a></p></li>
<li><p>This calculation method holds the boundary atoms fixed during the relaxation process which results in a mismatch stress at the border between the active and fixed regions that interacts with the dislocation. Increasing the distance between the dislocation and the boundary region, i.e. increasing the system size, will reduce the influence of the mismatch stresses.</p></li>
<li><p>The boundary atoms are fixed at the elasticity solution, which assumes the dislocation to be compact (not spread out, dissociated into partials) and to remain at the center of the system. An alternate simulation design or boundary region method should be used if you want accurate simulations of dislocations with wide cores and/or in which the dislocation moves long distances.</p></li>
<li><p>The calculation allows for the system to be relaxed either using only static energy/force minimizations or with molecular dynamic steps followed by a minimization. Only performing a static relaxation is considerably faster than performing a dynamic relaxation, but the dynamic relaxation is more likely to result in a better final dislocation structure.</p></li>
</ul>
</div>
</div>
<div class="section" id="Method-and-Theory">
<h2>Method and Theory<a class="headerlink" href="#Method-and-Theory" title="Permalink to this headline">¶</a></h2>
<div class="section" id="Stroh-theory">
<h3>Stroh theory<a class="headerlink" href="#Stroh-theory" title="Permalink to this headline">¶</a></h3>
<p>A detailed description of the Stroh method to solve the Eshelby solution for an anisotropic straight dislocation can be found in the <a class="reference external" href="https://www.ctcms.nist.gov/potentials/atomman/">atomman documentation</a>.</p>
</div>
<div class="section" id="Orientation">
<h3>Orientation<a class="headerlink" href="#Orientation" title="Permalink to this headline">¶</a></h3>
<p>One of the most important considerations in defining an atomistic system containing a dislocation monopole system is the system’s orientation. In particular, care is needed to properly align the system’s Cartesian axes, <span class="math notranslate nohighlight">\(x, y, z\)</span>, the system’s box vectors, <span class="math notranslate nohighlight">\(a, b, c\)</span>, and the Stroh solution’s axes, <span class="math notranslate nohighlight">\(u, m, n\)</span>.</p>
<ul class="simple">
<li><p>In order for the dislocation to remain perfectly straight in the atomic system, the dislocation line, <span class="math notranslate nohighlight">\(u\)</span>, must correspond to one of the system’s box vectors. The resulting dislocation monopole system will be periodic along the box direction corresponding to <span class="math notranslate nohighlight">\(u\)</span>, and non-periodic in the other two box directions.</p></li>
<li><p>The Stroh solution is invariant along the dislocation line direction, <span class="math notranslate nohighlight">\(u\)</span>, thereby the solution is 2 dimensional. <span class="math notranslate nohighlight">\(m\)</span> and <span class="math notranslate nohighlight">\(n\)</span> are the unit vectors for the 2D axis system used by the Stroh solution. As such, <span class="math notranslate nohighlight">\(u, m\)</span> and <span class="math notranslate nohighlight">\(n\)</span> are all normal to each other. The plane defined by the <span class="math notranslate nohighlight">\(um\)</span> vectors is the dislocation’s slip plane, i.e. <span class="math notranslate nohighlight">\(n\)</span> is normal to the slip plane.</p></li>
<li><p>For LAMMPS simulations, the system’s box vectors are limited such that <span class="math notranslate nohighlight">\(a\)</span> is parallel to the <span class="math notranslate nohighlight">\(x\)</span>-axis, and <span class="math notranslate nohighlight">\(b\)</span> is in the <span class="math notranslate nohighlight">\(xy\)</span>-plane (i.e. has no <span class="math notranslate nohighlight">\(z\)</span> component). Based on this and the previous two points, the most convenient, and therefore the default, orientation for a generic dislocation is to</p>
<ul>
<li><p>Make <span class="math notranslate nohighlight">\(u\)</span> and <span class="math notranslate nohighlight">\(a\)</span> parallel, which also places <span class="math notranslate nohighlight">\(u\)</span> parallel to the <span class="math notranslate nohighlight">\(x\)</span>-axis.</p></li>
<li><p>Select <span class="math notranslate nohighlight">\(b\)</span> such that it is within the slip plane. As <span class="math notranslate nohighlight">\(u\)</span> and <span class="math notranslate nohighlight">\(a\)</span> must also be in the slip plane, the plane itself is defined by <span class="math notranslate nohighlight">\(a \times b\)</span>.</p></li>
<li><p>Given that neither <span class="math notranslate nohighlight">\(a\)</span> nor <span class="math notranslate nohighlight">\(b\)</span> have <span class="math notranslate nohighlight">\(z\)</span> components, the normal to the slip plane will be perpendicular to <span class="math notranslate nohighlight">\(z\)</span>. From this, it naturally follows that <span class="math notranslate nohighlight">\(m\)</span> can be taken as parallel to the <span class="math notranslate nohighlight">\(y\)</span>-axis, and <span class="math notranslate nohighlight">\(n\)</span> parallel to the <span class="math notranslate nohighlight">\(z\)</span>-axis.</p></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="Calculation-methodology">
<h3>Calculation methodology<a class="headerlink" href="#Calculation-methodology" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li><p>An initial system is generated based on the loaded system and <em>uvw</em>, <em>atomshift</em>, and <em>sizemults</em> input parameters. This initial system is saved as base.dump.</p></li>
<li><p>The atomman.defect.Stroh class is used to obtain the dislocation solution based on the defined <span class="math notranslate nohighlight">\(m\)</span> and <span class="math notranslate nohighlight">\(n\)</span> vectors, <span class="math notranslate nohighlight">\(C_{ij}\)</span>, and the dislocation’s Burgers vector, <span class="math notranslate nohighlight">\(b_i\)</span>.</p></li>
<li><p>The dislocation is inserted into the system by displacing all atoms according to the Stroh solution’s displacements. The dislocation line is placed parallel to the specified <em>dislocation_lineboxvector</em> and includes the Cartesian point (0, 0, 0).</p></li>
<li><p>The box dimension parallel to the dislocation line is kept periodic, and the other two box directions are made non-periodic. A boundary region is defined that is at least <em>bwidth</em> thick at the edges of the two non-periodic directions, such that the shape of the active region corresponds to the <em>bshape</em> parameter. Atoms in the boundary region are identified by altering their integer atomic types.</p></li>
<li><p>The dislocation is relaxed by performing a LAMMPS simulation. The atoms in the active region are allowed to relax either with nvt integration followed by an energy/force minimization, or with just an energy/force minimization. The atoms in the boundary region are held fixed at the elastic solution. The resulting relaxed system is saved as disl.dump.</p></li>
<li><p>Parameters associated with the Stroh solution are saved to the results record.</p></li>
</ol>
</div>
</div>
<div class="section" id="Demonstration">
<h2>Demonstration<a class="headerlink" href="#Demonstration" title="Permalink to this headline">¶</a></h2>
<div class="section" id="1.-Setup">
<h3>1. Setup<a class="headerlink" href="#1.-Setup" title="Permalink to this headline">¶</a></h3>
<div class="section" id="1.1.-Library-imports">
<h4>1.1. Library imports<a class="headerlink" href="#1.1.-Library-imports" title="Permalink to this headline">¶</a></h4>
<p>Import libraries needed by the calculation. The external libraries used are:</p>
<ul class="simple">
<li><p><a class="reference external" href="http://www.numpy.org/">numpy</a></p></li>
<li><p><a class="reference external" href="https://github.com/usnistgov/atomman">atomman</a></p></li>
<li><p><a class="reference external" href="https://github.com/usnistgov/iprPy">iprPy</a></p></li>
</ul>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Standard library imports</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="k">import</span> <span class="n">Path</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">random</span>
<span class="kn">import</span> <span class="nn">datetime</span>

<span class="c1"># http://www.numpy.org/</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>

<span class="c1"># https://github.com/usnistgov/atomman</span>
<span class="kn">import</span> <span class="nn">atomman</span> <span class="k">as</span> <span class="nn">am</span>
<span class="kn">import</span> <span class="nn">atomman.lammps</span> <span class="k">as</span> <span class="nn">lmp</span>
<span class="kn">import</span> <span class="nn">atomman.unitconvert</span> <span class="k">as</span> <span class="nn">uc</span>

<span class="c1"># https://github.com/usnistgov/iprPy</span>
<span class="kn">import</span> <span class="nn">iprPy</span>

<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Notebook last executed on&#39;</span><span class="p">,</span> <span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="o">.</span><span class="n">today</span><span class="p">(),</span> <span class="s1">&#39;using iprPy version&#39;</span><span class="p">,</span> <span class="n">iprPy</span><span class="o">.</span><span class="n">__version__</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Notebook last executed on 2020-09-22 using iprPy version 0.10.2
</pre></div></div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">n</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="o">-</span><span class="mi">6</span><span class="p">])</span>
<span class="n">np</span><span class="o">.</span><span class="n">abs</span><span class="p">(</span><span class="n">n</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
</pre></div>
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
array([1, 3, 6])
</pre></div></div>
</div>
</div>
<div class="section" id="1.2.-Default-calculation-setup">
<h4>1.2. Default calculation setup<a class="headerlink" href="#1.2.-Default-calculation-setup" title="Permalink to this headline">¶</a></h4>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Specify calculation style</span>
<span class="n">calc_style</span> <span class="o">=</span> <span class="s1">&#39;dislocation_monopole&#39;</span>

<span class="c1"># If workingdir is already set, then do nothing (already in correct folder)</span>
<span class="k">try</span><span class="p">:</span>
    <span class="n">workingdir</span> <span class="o">=</span> <span class="n">workingdir</span>

<span class="c1"># Change to workingdir if not already there</span>
<span class="k">except</span><span class="p">:</span>
    <span class="n">workingdir</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="s1">&#39;calculationfiles&#39;</span><span class="p">,</span> <span class="n">calc_style</span><span class="p">)</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">workingdir</span><span class="o">.</span><span class="n">is_dir</span><span class="p">():</span>
        <span class="n">workingdir</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">parents</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
    <span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">workingdir</span><span class="p">)</span>

<span class="c1"># Initialize connection to library</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s1">&#39;C:/Users/lmh1/Documents/potentials_nist_gov/password.txt&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">user</span><span class="p">,</span> <span class="n">pswd</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
<span class="n">library</span> <span class="o">=</span> <span class="n">iprPy</span><span class="o">.</span><span class="n">Library</span><span class="p">(</span><span class="n">load</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;lammps_potentials&#39;</span><span class="p">],</span> <span class="n">username</span><span class="o">=</span><span class="n">user</span><span class="p">,</span> <span class="n">password</span><span class="o">=</span><span class="n">pswd</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="2.-Assign-values-for-the-calculation’s-run-parameters">
<h3>2. Assign values for the calculation’s run parameters<a class="headerlink" href="#2.-Assign-values-for-the-calculation’s-run-parameters" title="Permalink to this headline">¶</a></h3>
<div class="section" id="2.1.-Specify-system-specific-paths">
<h4>2.1. Specify system-specific paths<a class="headerlink" href="#2.1.-Specify-system-specific-paths" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>lammps_command</strong> (required) is the LAMMPS command to use.</p></li>
<li><p><strong>mpi_command</strong> MPI command for running LAMMPS in parallel. A value of None will run simulations serially.</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[4]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">lammps_command</span> <span class="o">=</span> <span class="s1">&#39;lmp_serial&#39;</span>
<span class="n">mpi_command</span> <span class="o">=</span> <span class="kc">None</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="2.2.-Load-interatomic-potential">
<h4>2.2. Load interatomic potential<a class="headerlink" href="#2.2.-Load-interatomic-potential" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>potential_name</strong> gives the name of the potential_LAMMPS reference record in the iprPy library to use for the calculation.</p></li>
<li><p><strong>potential</strong> is an atomman.lammps.Potential object (required).</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">potential_name</span> <span class="o">=</span> <span class="s1">&#39;1999--Mishin-Y--Ni--LAMMPS--ipr1&#39;</span>

<span class="c1"># Retrieve potential and parameter file(s)</span>
<span class="n">potential</span> <span class="o">=</span> <span class="n">library</span><span class="o">.</span><span class="n">get_lammps_potential</span><span class="p">(</span><span class="nb">id</span><span class="o">=</span><span class="n">potential_name</span><span class="p">,</span> <span class="n">getfiles</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="2.3.-Load-initial-unit-cell-system">
<h4>2.3. Load initial unit cell system<a class="headerlink" href="#2.3.-Load-initial-unit-cell-system" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>ucell</strong> is an atomman.System representing a fundamental unit cell of the system (required). Here, this is loaded from the database for the prototype.</p></li>
</ul>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Create ucell by loading prototype record</span>
<span class="n">ucell</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="s1">&#39;crystal&#39;</span><span class="p">,</span> <span class="n">potential</span><span class="o">=</span><span class="n">potential</span><span class="p">,</span> <span class="n">family</span><span class="o">=</span><span class="s1">&#39;A1--Cu--fcc&#39;</span><span class="p">,</span> <span class="n">database</span><span class="o">=</span><span class="n">library</span><span class="p">)</span>

<span class="nb">print</span><span class="p">(</span><span class="n">ucell</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
avect =  [ 3.520,  0.000,  0.000]
bvect =  [ 0.000,  3.520,  0.000]
cvect =  [ 0.000,  0.000,  3.520]
origin = [ 0.000,  0.000,  0.000]
natoms = 4
natypes = 1
symbols = (&#39;Ni&#39;,)
pbc = [ True  True  True]
per-atom properties = [&#39;atype&#39;, &#39;pos&#39;]
     id |   atype |  pos[0] |  pos[1] |  pos[2]
      0 |       1 |   0.000 |   0.000 |   0.000
      1 |       1 |   0.000 |   1.760 |   1.760
      2 |       1 |   1.760 |   0.000 |   1.760
      3 |       1 |   1.760 |   1.760 |   0.000
</pre></div></div>
</div>
</div>
<div class="section" id="2.4-Specify-material-elastic-constants">
<h4>2.4 Specify material elastic constants<a class="headerlink" href="#2.4-Specify-material-elastic-constants" title="Permalink to this headline">¶</a></h4>
<p>Simple input parameters:</p>
<ul class="simple">
<li><p><strong>C_dict</strong> is a dictionary containing the unique elastic constants for the potential and crystal structure defined above.</p></li>
</ul>
<p>Derived parameters</p>
<ul class="simple">
<li><p><strong>C</strong> is an atomman.ElasticConstants object built from C_dict.</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">C_dict</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">C_dict</span><span class="p">[</span><span class="s1">&#39;C11&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">247.86</span><span class="p">,</span> <span class="s1">&#39;GPa&#39;</span><span class="p">)</span>
<span class="n">C_dict</span><span class="p">[</span><span class="s1">&#39;C12&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">147.83</span><span class="p">,</span> <span class="s1">&#39;GPa&#39;</span><span class="p">)</span>
<span class="n">C_dict</span><span class="p">[</span><span class="s1">&#39;C44&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">124.84</span><span class="p">,</span> <span class="s1">&#39;GPa&#39;</span><span class="p">)</span>

<span class="c1"># -------------- Derived parameters -------------- #</span>
<span class="c1"># Build ElasticConstants object from C_dict terms</span>
<span class="n">C</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">ElasticConstants</span><span class="p">(</span><span class="o">**</span><span class="n">C_dict</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="2.5-Specify-the-defect-parameters">
<h4>2.5 Specify the defect parameters<a class="headerlink" href="#2.5-Specify-the-defect-parameters" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>burgers</strong> is the crystallographic Miller Burgers vector for the dislocation.</p></li>
<li><p><strong>ξ_uvw</strong> is the Miller [uvw] line vector direction for the dislocation. The angle between burgers and ξ_uvw determines the dislocation’s character</p></li>
<li><p><strong>slip_hkl</strong> is the Miller (hkl) slip plane for the dislocation.</p></li>
<li><p><strong>m</strong> is the Cartesian vector of the final system that the dislocation solution’s m vector (in-plane, perpendicular to ξ) should align with. Limited to being parallel to one of the three Cartesian axes.</p></li>
<li><p><strong>n</strong> is the Cartesian vector of the final system that the dislocation solution’s n vector (slip plane normal) should align with. Limited to being parallel to one of the three Cartesian axes.</p></li>
<li><p><strong>shift</strong> is a rigid body shift to apply to the atoms in the system. This controls how the atomic positions align with the ideal position of the dislocation core, which is at coordinates (0,0) for the two Cartesian axes aligned with m and n.</p></li>
<li><p><strong>shiftscale</strong> allows for shift to be defined relative to the cell created by rotating ucell to coincide with the dislocation solution orientation. This is useful as it allows for shift values to be defined relative to the defect type and crystal prototype rather than on a per-crystal basis.</p></li>
<li><p><strong>shiftindex</strong> alternate to specifying shift values, the shiftindex allows for one of the identified suggested shift values to be used that will position the slip plane halfway between two planes of atoms. Note that shiftindex values only shift atoms in the slip plane normal direction and may not be the ideal positions for some dislocation cores.</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[8]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># fcc a/2 &lt;110&gt;{111} dislocations</span>
<span class="n">burgers</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span> <span class="mf">1.</span><span class="p">,</span> <span class="o">-</span><span class="mf">1.</span><span class="p">,</span> <span class="mf">0.</span><span class="p">])</span>
<span class="n">slip_hkl</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span>

<span class="c1"># Line direction determines dislocation character</span>
<span class="n">ξ_uvw</span> <span class="o">=</span> <span class="p">[</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span> <span class="c1"># 90 degree edge</span>
<span class="c1">#ξ_uvw = [ 1, 0,-1] # 60 degree mixed</span>
<span class="c1">#ξ_uvw = [ 1,-2, 1] # 30 degree mixed</span>
<span class="c1">#ξ_uvw = [ 1,-1, 0] # 0 degree screw</span>

<span class="c1"># Best choice for m + n as it works for non-cubic systems</span>
<span class="n">m</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">]</span>
<span class="n">n</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>

<span class="c1"># Specify shift or shiftindex</span>
<span class="n">shift</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">shiftscale</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">shiftindex</span> <span class="o">=</span> <span class="mi">0</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="2.6-Specify-calculation-specific-run-parameters">
<h4>2.6 Specify calculation-specific run parameters<a class="headerlink" href="#2.6-Specify-calculation-specific-run-parameters" title="Permalink to this headline">¶</a></h4>
<p>Simple input parameters:</p>
<ul class="simple">
<li><p><strong>boundarywidth</strong> sets the minimum width of the fixed-atom boundary region.</p></li>
<li><p><strong>boundaryscale</strong> flag indicating if boundarywidth is absolute (False) or scaled relative to ucell’s a lattice parameter (True).</p></li>
<li><p><strong>boundaryshape</strong> specifies what shape to make the fixed-atom boundary region.</p>
<ul>
<li><p><strong>cylinder</strong> will create a cylindrical active region.</p></li>
<li><p><strong>box</strong> will create a rectangular active region.</p></li>
</ul>
</li>
<li><p><strong>annealtemperature</strong> is the temperature at which to relax (anneal) the dislocation system. If annealtemperature is 0.0, then only a static relaxation will be performed. Default value is 0.0.</p></li>
<li><p><strong>annealsteps</strong> is the number of nvt iteration steps to perform at the given temperature. Default value is 0 if annealtemperature is zero, 10000 otherwise.</p></li>
<li><p><strong>randomseed</strong> allows for the random seed used in generating initial atomic velocities for a dynamic relaxation to be specified. This is an integer between 1 and 900000000. Default value is None, which will randomly pick a number in that range.</p></li>
<li><p><strong>energytolerance</strong> is the energy tolerance to use during the minimizations. This is unitless.</p></li>
<li><p><strong>forcetolerance</strong> is the force tolerance to use during the minimizations. This is in energy/length units.</p></li>
<li><p><strong>maxiterations</strong> is the maximum number of minimization iterations to use.</p></li>
<li><p><strong>maxevaluations</strong> is the maximum number of minimization evaluations to use.</p></li>
<li><p><strong>maxatommotion</strong> is the largest distance that an atom is allowed to move during a minimization iteration. This is in length units.</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[9]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Specify the boundary shape to use</span>
<span class="n">boundarywidth</span> <span class="o">=</span> <span class="mi">3</span>
<span class="n">boundaryscale</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">boundaryshape</span> <span class="o">=</span> <span class="s1">&#39;cylinder&#39;</span>

<span class="c1"># Specify MD anneal parameters</span>
<span class="n">annealtemperature</span> <span class="o">=</span> <span class="mf">50.0</span>
<span class="n">annealsteps</span> <span class="o">=</span> <span class="mi">10000</span>
<span class="n">randomseed</span> <span class="o">=</span> <span class="kc">None</span>

<span class="c1"># Specify minimization parameters</span>
<span class="n">energytolerance</span> <span class="o">=</span> <span class="mf">0.0</span>
<span class="n">forcetolerance</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">1e-6</span><span class="p">,</span> <span class="s1">&#39;eV/angstrom&#39;</span><span class="p">)</span>
<span class="n">maxiterations</span> <span class="o">=</span> <span class="mi">10000</span>
<span class="n">maxevaluations</span> <span class="o">=</span> <span class="mi">100000</span>
<span class="n">maxatommotion</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="s1">&#39;angstrom&#39;</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="2.7.-Modify-system">
<h4>2.7. Modify system<a class="headerlink" href="#2.7.-Modify-system" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>sizemults</strong> list of three sets of two integers specifying how many times the ucell vectors of <span class="math notranslate nohighlight">\(a\)</span>, <span class="math notranslate nohighlight">\(b\)</span> and <span class="math notranslate nohighlight">\(c\)</span> are replicated in positive and negative directions when creating system.</p></li>
<li><p><strong>amin, bmin, cmin</strong> specifies minimum widths in the three directions. The corresponding sizemults will be increased to ensure these widths if needed.</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">sizemults</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">40</span><span class="p">,</span> <span class="mi">40</span><span class="p">]</span>
<span class="n">amin</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="s1">&#39;angstrom&#39;</span><span class="p">)</span>
<span class="n">bmin</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="s1">&#39;angstrom&#39;</span><span class="p">)</span>
<span class="n">cmin</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="s1">&#39;angstrom&#39;</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="3.-Define-calculation-function(s)-and-generate-template-LAMMPS-script(s)">
<h3>3. Define calculation function(s) and generate template LAMMPS script(s)<a class="headerlink" href="#3.-Define-calculation-function(s)-and-generate-template-LAMMPS-script(s)" title="Permalink to this headline">¶</a></h3>
<div class="section" id="3.1.-disl_relax.template">
<h4>3.1. disl_relax.template<a class="headerlink" href="#3.1.-disl_relax.template" title="Permalink to this headline">¶</a></h4>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[11]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s1">&#39;disl_relax.template&#39;</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s2">&quot;&quot;&quot;#LAMMPS input script for relaxing a dislocation</span>

<span class="s2">&lt;atomman_system_pair_info&gt;</span>

<span class="s2">group move type &lt;group_move&gt;</span>
<span class="s2">group hold subtract all move</span>

<span class="s2">compute peatom all pe/atom</span>

<span class="s2">dump first all custom &lt;maxeval&gt; *.dump id type x y z c_peatom</span>
<span class="s2">dump_modify first format &lt;dump_modify_format&gt;</span>
<span class="s2">thermo_style custom step pe</span>

<span class="s2">fix nomove hold setforce 0.0 0.0 0.0</span>

<span class="s2">&lt;anneal_info&gt;</span>

<span class="s2">min_modify dmax &lt;dmax&gt;</span>

<span class="s2">minimize &lt;etol&gt; &lt;ftol&gt; &lt;maxiter&gt; &lt;maxeval&gt;&quot;&quot;&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="3.2.-dislocationmonopole()">
<h4>3.2. dislocationmonopole()<a class="headerlink" href="#3.2.-dislocationmonopole()" title="Permalink to this headline">¶</a></h4>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[12]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="k">def</span> <span class="nf">dislocationmonopole</span><span class="p">(</span><span class="n">lammps_command</span><span class="p">,</span> <span class="n">ucell</span><span class="p">,</span> <span class="n">potential</span><span class="p">,</span> <span class="n">C</span><span class="p">,</span> <span class="n">burgers</span><span class="p">,</span> <span class="n">ξ_uvw</span><span class="p">,</span>
                        <span class="n">slip_hkl</span><span class="p">,</span> <span class="n">mpi_command</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">m</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">0</span><span class="p">],</span> <span class="n">n</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">],</span>
                        <span class="n">sizemults</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">amin</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">bmin</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">cmin</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                        <span class="n">shift</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">shiftscale</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">shiftindex</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">tol</span><span class="o">=</span><span class="mf">1e-8</span><span class="p">,</span>
                        <span class="n">etol</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">ftol</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">maxiter</span><span class="o">=</span><span class="mi">10000</span><span class="p">,</span> <span class="n">maxeval</span><span class="o">=</span><span class="mi">100000</span><span class="p">,</span>
                        <span class="n">dmax</span><span class="o">=</span><span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="s1">&#39;angstrom&#39;</span><span class="p">),</span>
                        <span class="n">annealtemp</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">annealsteps</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">randomseed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                        <span class="n">boundaryshape</span><span class="o">=</span><span class="s1">&#39;cylinder&#39;</span><span class="p">,</span> <span class="n">boundarywidth</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">boundaryscale</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Creates and relaxes a dislocation monopole system.</span>

<span class="sd">    Parameters</span>
<span class="sd">    ----------</span>
<span class="sd">    lammps_command :str</span>
<span class="sd">        Command for running LAMMPS.</span>
<span class="sd">    ucell : atomman.System</span>
<span class="sd">        The unit cell to use as the seed for generating the dislocation</span>
<span class="sd">        monopole system.</span>
<span class="sd">    potential : atomman.lammps.Potential</span>
<span class="sd">        The LAMMPS implemented potential to use.</span>
<span class="sd">    C : atomman.ElasticConstants</span>
<span class="sd">        The elastic constants associated with the bulk crystal structure</span>
<span class="sd">        for ucell.</span>
<span class="sd">    burgers : array-like object</span>
<span class="sd">        The dislocation&#39;s Burgers vector given as a Miller or</span>
<span class="sd">        Miller-Bravais vector relative to ucell.</span>
<span class="sd">    ξ_uvw : array-like object</span>
<span class="sd">        The dislocation&#39;s line direction given as a Miller or</span>
<span class="sd">        Miller-Bravais vector relative to ucell.</span>
<span class="sd">    slip_hkl : array-like object</span>
<span class="sd">        The dislocation&#39;s slip plane given as a Miller or Miller-Bravais</span>
<span class="sd">        plane relative to ucell.</span>
<span class="sd">    mpi_command : str or None, optional</span>
<span class="sd">        The MPI command for running LAMMPS in parallel.  If not given, LAMMPS</span>
<span class="sd">        will run serially.</span>
<span class="sd">    m : array-like object, optional</span>
<span class="sd">        The m unit vector for the dislocation solution.  m, n, and ξ</span>
<span class="sd">        (dislocation line) should be right-hand orthogonal.  Default value</span>
<span class="sd">        is [0,1,0] (y-axis).</span>
<span class="sd">    n : array-like object, optional</span>
<span class="sd">        The n unit vector for the dislocation solution.  m, n, and ξ</span>
<span class="sd">        (dislocation line) should be right-hand orthogonal.  Default value</span>
<span class="sd">        is [0,0,1] (z-axis). n is normal to the dislocation slip plane.</span>
<span class="sd">    sizemults : tuple, optional</span>
<span class="sd">        The size multipliers to use when generating the system.  Values are</span>
<span class="sd">        limited to being positive integers.  The multipliers for the two</span>
<span class="sd">        non-periodic directions must be even.  If not given, the default</span>
<span class="sd">        multipliers will be 2 for the non-periodic directions and 1 for the</span>
<span class="sd">        periodic direction.</span>
<span class="sd">    amin : float, optional</span>
<span class="sd">        A minimum thickness to use for the a box vector direction of the</span>
<span class="sd">        final system.  Default value is 0.0.  For the non-periodic</span>
<span class="sd">        directions, the resulting vector multiplier will be even.  If both</span>
<span class="sd">        amin and sizemults is given, then the larger multiplier for the two</span>
<span class="sd">        will be used.</span>
<span class="sd">    bmin : float, optional</span>
<span class="sd">        A minimum thickness to use for the b box vector direction of the</span>
<span class="sd">        final system.  Default value is 0.0.  For the non-periodic</span>
<span class="sd">        directions, the resulting vector multiplier will be even.  If both</span>
<span class="sd">        bmin and sizemults is given, then the larger multiplier for the two</span>
<span class="sd">        will be used.</span>
<span class="sd">    cmin : float, optional</span>
<span class="sd">        A minimum thickness to use for the c box vector direction of the</span>
<span class="sd">        final system.  Default value is 0.0.  For the non-periodic</span>
<span class="sd">        directions, the resulting vector multiplier will be even.  If both</span>
<span class="sd">        cmin and sizemults is given, then the larger multiplier for the two</span>
<span class="sd">        will be used.</span>
<span class="sd">    shift : float, optional</span>
<span class="sd">        A rigid body shift to apply to the rotated cell prior to inserting</span>
<span class="sd">        the dislocation.  Should be selected such that the ideal slip plane</span>
<span class="sd">        does not correspond to any atomic planes.  Is taken as absolute if</span>
<span class="sd">        shiftscale is False, or relative to the rotated cell&#39;s box vectors</span>
<span class="sd">        if shiftscale is True.  Cannot be given with shiftindex.  If</span>
<span class="sd">        neither shift nor shiftindex is given then shiftindex = 0 is used.</span>
<span class="sd">    shiftindex : float, optional</span>
<span class="sd">        The index of the identified optimum shifts based on the rotated</span>
<span class="sd">        cell to use.  Different values allow for the selection of different</span>
<span class="sd">        atomic planes neighboring the slip plane.  Note that shiftindex</span>
<span class="sd">        values only apply shifts normal to the slip plane; best shifts for</span>
<span class="sd">        non-planar dislocations (like bcc screw) may also need a shift in</span>
<span class="sd">        the slip plane.  Cannot be given with shiftindex.  If neither shift</span>
<span class="sd">        nor shiftindex is given then shiftindex = 0 is used.</span>
<span class="sd">    shiftscale : bool, optional</span>
<span class="sd">        If False (default), a given shift value will be taken as absolute</span>
<span class="sd">        Cartesian.  If True, a given shift will be taken relative to the</span>
<span class="sd">        rotated cell&#39;s box vectors.</span>
<span class="sd">    tol : float</span>
<span class="sd">        A cutoff tolerance used with obtaining the dislocation solution.</span>
<span class="sd">        Only needs to be changed if there are issues with obtaining a</span>
<span class="sd">        solution.</span>
<span class="sd">    etol : float, optional</span>
<span class="sd">        The energy tolerance for the structure minimization. This value is</span>
<span class="sd">        unitless. Default is 0.0.</span>
<span class="sd">    ftol : float, optional</span>
<span class="sd">        The force tolerance for the structure minimization. This value is in</span>
<span class="sd">        units of force. Default is 0.0.</span>
<span class="sd">    maxiter : int, optional</span>
<span class="sd">        The maximum number of minimization iterations to use. Default is</span>
<span class="sd">        10000.</span>
<span class="sd">    maxeval : int, optional</span>
<span class="sd">        The maximum number of minimization evaluations to use. Default is</span>
<span class="sd">        100000.</span>
<span class="sd">    dmax : float, optional</span>
<span class="sd">        The maximum distance in length units that any atom is allowed to relax</span>
<span class="sd">        in any direction during a single minimization iteration. Default is</span>
<span class="sd">        0.01 Angstroms.</span>
<span class="sd">    annealtemp : float, optional</span>
<span class="sd">        The temperature to perform a dynamic relaxation at. Default is 0.0,</span>
<span class="sd">        which will skip the dynamic relaxation.</span>
<span class="sd">    annealsteps : int, optional</span>
<span class="sd">        The number of time steps to run the dynamic relaxation for.  Default</span>
<span class="sd">        is None, which will run for 10000 steps if annealtemp is not 0.0.</span>
<span class="sd">    randomseed : int or None, optional</span>
<span class="sd">        Random number seed used by LAMMPS in creating velocities and with</span>
<span class="sd">        the Langevin thermostat.  Default is None which will select a</span>
<span class="sd">        random int between 1 and 900000000.</span>
<span class="sd">    boundaryshape : str, optional</span>
<span class="sd">        Indicates the shape of the boundary region to use.  Options are</span>
<span class="sd">        &#39;cylinder&#39; (default) and &#39;box&#39;.  For &#39;cylinder&#39;, the non-boundary</span>
<span class="sd">        region is defined by a cylinder with axis along the dislocation</span>
<span class="sd">        line and a radius that ensures the boundary is at least</span>
<span class="sd">        boundarywidth thick.  For &#39;box&#39;, the boundary region will be</span>
<span class="sd">        exactly boundarywidth thick all around.</span>
<span class="sd">    boundarywidth : float, optional</span>
<span class="sd">        The width of the boundary region to apply.  Default value is 0.0,</span>
<span class="sd">        i.e. no boundary region.  All atoms in the boundary region will</span>
<span class="sd">        have their atype values changed.</span>
<span class="sd">    boundaryscale : bool, optional</span>
<span class="sd">        If False (Default), the boundarywidth will be taken as absolute.</span>
<span class="sd">        If True, the boundarywidth will be taken relative to the magnitude</span>
<span class="sd">        of the unit cell&#39;s a box vector.</span>

<span class="sd">    Returns</span>
<span class="sd">    -------</span>
<span class="sd">    dict</span>
<span class="sd">        Dictionary of results consisting of keys:</span>

<span class="sd">        - **&#39;dumpfile_base&#39;** (*str*) - The filename of the LAMMPS dump file</span>
<span class="sd">          for the relaxed base system.</span>
<span class="sd">        - **&#39;symbols_base&#39;** (*list of str*) - The list of element-model</span>
<span class="sd">          symbols for the Potential that correspond to the base system&#39;s</span>
<span class="sd">          atypes.</span>
<span class="sd">        - **&#39;dumpfile_disl&#39;** (*str*) - The filename of the LAMMPS dump file</span>
<span class="sd">          for the relaxed dislocation monopole system.</span>
<span class="sd">        - **&#39;symbols_disl&#39;** (*list of str*) - The list of element-model</span>
<span class="sd">          symbols for the Potential that correspond to the dislocation</span>
<span class="sd">          monopole system&#39;s atypes.</span>
<span class="sd">        - **&#39;dislocation&#39;** (*atomman.defect.Dislocation*) - The Dislocation</span>
<span class="sd">          object used to generate the monopole system.</span>
<span class="sd">        - **&#39;E_total_disl&#39;** (*float*) - The total potential energy of the</span>
<span class="sd">          dislocation monopole system.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="c1"># Construct dislocation configuration generator</span>
    <span class="n">dislocation</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">defect</span><span class="o">.</span><span class="n">Dislocation</span><span class="p">(</span><span class="n">ucell</span><span class="p">,</span> <span class="n">C</span><span class="p">,</span> <span class="n">burgers</span><span class="p">,</span> <span class="n">ξ_uvw</span><span class="p">,</span> <span class="n">slip_hkl</span><span class="p">,</span>
                                        <span class="n">m</span><span class="o">=</span><span class="n">m</span><span class="p">,</span> <span class="n">n</span><span class="o">=</span><span class="n">n</span><span class="p">,</span> <span class="n">shift</span><span class="o">=</span><span class="n">shift</span><span class="p">,</span> <span class="n">shiftindex</span><span class="o">=</span><span class="n">shiftindex</span><span class="p">,</span>
                                        <span class="n">shiftscale</span><span class="o">=</span><span class="n">shiftscale</span><span class="p">,</span> <span class="n">tol</span><span class="o">=</span><span class="n">tol</span><span class="p">)</span>

    <span class="c1"># Generate the base and dislocation systems</span>
    <span class="n">base_system</span><span class="p">,</span> <span class="n">disl_system</span> <span class="o">=</span> <span class="n">dislocation</span><span class="o">.</span><span class="n">monopole</span><span class="p">(</span><span class="n">sizemults</span><span class="o">=</span><span class="n">sizemults</span><span class="p">,</span>
                                                    <span class="n">amin</span><span class="o">=</span><span class="n">amin</span><span class="p">,</span> <span class="n">bmin</span><span class="o">=</span><span class="n">bmin</span><span class="p">,</span> <span class="n">cmin</span><span class="o">=</span><span class="n">cmin</span><span class="p">,</span>
                                                    <span class="n">shift</span><span class="o">=</span><span class="n">shift</span><span class="p">,</span>
                                                    <span class="n">shiftindex</span><span class="o">=</span><span class="n">shiftindex</span><span class="p">,</span>
                                                    <span class="n">shiftscale</span><span class="o">=</span><span class="n">shiftscale</span><span class="p">,</span>
                                                    <span class="n">boundaryshape</span><span class="o">=</span><span class="n">boundaryshape</span><span class="p">,</span>
                                                    <span class="n">boundarywidth</span><span class="o">=</span><span class="n">boundarywidth</span><span class="p">,</span>
                                                    <span class="n">boundaryscale</span><span class="o">=</span><span class="n">boundaryscale</span><span class="p">,</span>
                                                    <span class="n">return_base_system</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>

    <span class="c1"># Initialize results dict</span>
    <span class="n">results_dict</span> <span class="o">=</span> <span class="p">{}</span>

    <span class="c1"># Save initial perfect system</span>
    <span class="n">base_system</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="s1">&#39;atom_dump&#39;</span><span class="p">,</span> <span class="n">f</span><span class="o">=</span><span class="s1">&#39;base.dump&#39;</span><span class="p">)</span>
    <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;dumpfile_base&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;base.dump&#39;</span>
    <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;symbols_base&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">base_system</span><span class="o">.</span><span class="n">symbols</span>

    <span class="c1"># Save dislocation generator</span>
    <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;dislocation&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">dislocation</span>

    <span class="c1"># Relax system</span>
    <span class="n">relaxed</span> <span class="o">=</span> <span class="n">disl_relax</span><span class="p">(</span><span class="n">lammps_command</span><span class="p">,</span> <span class="n">disl_system</span><span class="p">,</span> <span class="n">potential</span><span class="p">,</span>
                         <span class="n">mpi_command</span><span class="o">=</span><span class="n">mpi_command</span><span class="p">,</span> <span class="n">annealtemp</span><span class="o">=</span><span class="n">annealtemp</span><span class="p">,</span>
                         <span class="n">annealsteps</span><span class="o">=</span><span class="n">annealsteps</span><span class="p">,</span> <span class="n">randomseed</span><span class="o">=</span><span class="n">randomseed</span><span class="p">,</span>
                         <span class="n">etol</span><span class="o">=</span><span class="n">etol</span><span class="p">,</span> <span class="n">ftol</span><span class="o">=</span><span class="n">ftol</span><span class="p">,</span> <span class="n">maxiter</span><span class="o">=</span><span class="n">maxiter</span><span class="p">,</span>
                         <span class="n">maxeval</span><span class="o">=</span><span class="n">maxeval</span><span class="p">,</span> <span class="n">dmax</span><span class="o">=</span><span class="n">dmax</span><span class="p">)</span>

    <span class="c1"># Save relaxed dislocation system with original box vects</span>
    <span class="n">system_disl</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="s1">&#39;atom_dump&#39;</span><span class="p">,</span> <span class="n">relaxed</span><span class="p">[</span><span class="s1">&#39;dumpfile&#39;</span><span class="p">],</span> <span class="n">symbols</span><span class="o">=</span><span class="n">disl_system</span><span class="o">.</span><span class="n">symbols</span><span class="p">)</span>

    <span class="n">system_disl</span><span class="o">.</span><span class="n">box_set</span><span class="p">(</span><span class="n">vects</span><span class="o">=</span><span class="n">disl_system</span><span class="o">.</span><span class="n">box</span><span class="o">.</span><span class="n">vects</span><span class="p">,</span> <span class="n">origin</span><span class="o">=</span><span class="n">disl_system</span><span class="o">.</span><span class="n">box</span><span class="o">.</span><span class="n">origin</span><span class="p">)</span>
    <span class="n">system_disl</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="s1">&#39;atom_dump&#39;</span><span class="p">,</span> <span class="n">f</span><span class="o">=</span><span class="s1">&#39;disl.dump&#39;</span><span class="p">)</span>
    <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;dumpfile_disl&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;disl.dump&#39;</span>
    <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;symbols_disl&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">system_disl</span><span class="o">.</span><span class="n">symbols</span>

    <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;E_total_disl&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">relaxed</span><span class="p">[</span><span class="s1">&#39;E_total&#39;</span><span class="p">]</span>

    <span class="c1"># Cleanup files</span>
    <span class="n">Path</span><span class="p">(</span><span class="s1">&#39;0.dump&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>
    <span class="n">Path</span><span class="p">(</span><span class="n">relaxed</span><span class="p">[</span><span class="s1">&#39;dumpfile&#39;</span><span class="p">])</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>
    <span class="k">for</span> <span class="n">dumpjsonfile</span> <span class="ow">in</span> <span class="n">Path</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">glob</span><span class="p">(</span><span class="s1">&#39;*.dump.json&#39;</span><span class="p">):</span>
        <span class="n">dumpjsonfile</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>

    <span class="k">return</span> <span class="n">results_dict</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="3.3.-disl_relax()">
<h4>3.3. disl_relax()<a class="headerlink" href="#3.3.-disl_relax()" title="Permalink to this headline">¶</a></h4>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[13]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="k">def</span> <span class="nf">disl_relax</span><span class="p">(</span><span class="n">lammps_command</span><span class="p">,</span> <span class="n">system</span><span class="p">,</span> <span class="n">potential</span><span class="p">,</span>
               <span class="n">mpi_command</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
               <span class="n">annealtemp</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">annealsteps</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">randomseed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
               <span class="n">etol</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">ftol</span><span class="o">=</span><span class="mf">1e-6</span><span class="p">,</span> <span class="n">maxiter</span><span class="o">=</span><span class="mi">10000</span><span class="p">,</span> <span class="n">maxeval</span><span class="o">=</span><span class="mi">100000</span><span class="p">,</span>
               <span class="n">dmax</span><span class="o">=</span><span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">0.01</span><span class="p">,</span> <span class="s1">&#39;angstrom&#39;</span><span class="p">)):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Sets up and runs the disl_relax.in LAMMPS script for relaxing a</span>
<span class="sd">    dislocation monopole system.</span>

<span class="sd">    Parameters</span>
<span class="sd">    ----------</span>
<span class="sd">    lammps_command :str</span>
<span class="sd">        Command for running LAMMPS.</span>
<span class="sd">    system : atomman.System</span>
<span class="sd">        The system to perform the calculation on.</span>
<span class="sd">    potential : atomman.lammps.Potential</span>
<span class="sd">        The LAMMPS implemented potential to use.</span>
<span class="sd">    mpi_command : str, optional</span>
<span class="sd">        The MPI command for running LAMMPS in parallel.  If not given, LAMMPS</span>
<span class="sd">        will run serially.</span>
<span class="sd">    annealtemp : float, optional</span>
<span class="sd">        The temperature to perform a dynamic relaxation at. Default is 0.0,</span>
<span class="sd">        which will skip the dynamic relaxation.</span>
<span class="sd">    annealsteps : int, optional</span>
<span class="sd">        The number of time steps to run the dynamic relaxation for.  Default</span>
<span class="sd">        is None, which will run for 10000 steps if annealtemp is not 0.0.</span>
<span class="sd">    randomseed : int or None, optional</span>
<span class="sd">        Random number seed used by LAMMPS in creating velocities and with</span>
<span class="sd">        the Langevin thermostat.  Default is None which will select a</span>
<span class="sd">        random int between 1 and 900000000.</span>
<span class="sd">    etol : float, optional</span>
<span class="sd">        The energy tolerance for the structure minimization. This value is</span>
<span class="sd">        unitless. Default is 0.0.</span>
<span class="sd">    ftol : float, optional</span>
<span class="sd">        The force tolerance for the structure minimization. This value is in</span>
<span class="sd">        units of force. Default is 0.0.</span>
<span class="sd">    maxiter : int, optional</span>
<span class="sd">        The maximum number of minimization iterations to use default is</span>
<span class="sd">        10000.</span>
<span class="sd">    maxeval : int, optional</span>
<span class="sd">        The maximum number of minimization evaluations to use default is</span>
<span class="sd">        100000.</span>
<span class="sd">    dmax : float, optional</span>
<span class="sd">        The maximum distance in length units that any atom is allowed to relax</span>
<span class="sd">        in any direction during a single minimization iteration default is</span>
<span class="sd">        0.01 Angstroms.</span>

<span class="sd">    Returns</span>
<span class="sd">    -------</span>
<span class="sd">    dict</span>
<span class="sd">        Dictionary of results consisting of keys:</span>

<span class="sd">        - **&#39;logfile&#39;** (*str*) - The name of the LAMMPS log file.</span>
<span class="sd">        - **&#39;dumpfile&#39;** (*str*) - The name of the LAMMPS dump file</span>
<span class="sd">          for the relaxed system.</span>
<span class="sd">        - **&#39;E_total&#39;** (*float*) - The total potential energy for the</span>
<span class="sd">          relaxed system.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="c1"># Build filedict if function was called from iprPy</span>
    <span class="k">try</span><span class="p">:</span>
        <span class="k">assert</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="n">pkg_name</span>
        <span class="n">calc</span> <span class="o">=</span> <span class="n">iprPy</span><span class="o">.</span><span class="n">load_calculation</span><span class="p">(</span><span class="n">calculation_style</span><span class="p">)</span>
        <span class="n">filedict</span> <span class="o">=</span> <span class="n">calc</span><span class="o">.</span><span class="n">filedict</span>
    <span class="k">except</span><span class="p">:</span>
        <span class="n">filedict</span> <span class="o">=</span> <span class="p">{}</span>

    <span class="c1"># Get lammps units</span>
    <span class="n">lammps_units</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">style</span><span class="o">.</span><span class="n">unit</span><span class="p">(</span><span class="n">potential</span><span class="o">.</span><span class="n">units</span><span class="p">)</span>

    <span class="c1">#Get lammps version date</span>
    <span class="n">lammps_date</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">checkversion</span><span class="p">(</span><span class="n">lammps_command</span><span class="p">)[</span><span class="s1">&#39;date&#39;</span><span class="p">]</span>

    <span class="c1"># Define lammps variables</span>
    <span class="n">lammps_variables</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="n">system_info</span> <span class="o">=</span> <span class="n">system</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="s1">&#39;atom_data&#39;</span><span class="p">,</span> <span class="n">f</span><span class="o">=</span><span class="s1">&#39;system.dat&#39;</span><span class="p">,</span>
                              <span class="n">potential</span><span class="o">=</span><span class="n">potential</span><span class="p">,</span>
                              <span class="n">return_pair_info</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;atomman_system_pair_info&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">system_info</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;anneal_info&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">anneal_info</span><span class="p">(</span><span class="n">annealtemp</span><span class="p">,</span> <span class="n">annealsteps</span><span class="p">,</span>
                                                  <span class="n">randomseed</span><span class="p">,</span> <span class="n">potential</span><span class="o">.</span><span class="n">units</span><span class="p">)</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;etol&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">etol</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;ftol&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">get_in_units</span><span class="p">(</span><span class="n">ftol</span><span class="p">,</span> <span class="n">lammps_units</span><span class="p">[</span><span class="s1">&#39;force&#39;</span><span class="p">])</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;maxiter&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">maxiter</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;maxeval&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">maxeval</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;dmax&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">dmax</span>
    <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;group_move&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39; &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">system</span><span class="o">.</span><span class="n">natypes</span> <span class="o">//</span> <span class="mi">2</span> <span class="o">+</span> <span class="mi">1</span><span class="p">),</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">str</span><span class="p">))</span>

    <span class="c1"># Set dump_modify format based on dump_modify_version</span>
    <span class="k">if</span> <span class="n">lammps_date</span> <span class="o">&lt;</span> <span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">3</span><span class="p">):</span>
        <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;dump_modify_format&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;&quot;</span><span class="si">%d</span><span class="s1"> </span><span class="si">%d</span><span class="s1"> </span><span class="si">%.13e</span><span class="s1"> </span><span class="si">%.13e</span><span class="s1"> </span><span class="si">%.13e</span><span class="s1"> </span><span class="si">%.13e</span><span class="s1">&quot;&#39;</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="n">lammps_variables</span><span class="p">[</span><span class="s1">&#39;dump_modify_format&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;float </span><span class="si">%.13e</span><span class="s1">&#39;</span>

    <span class="c1"># Write lammps input script</span>
    <span class="n">template_file</span> <span class="o">=</span> <span class="s1">&#39;disl_relax.template&#39;</span>
    <span class="n">lammps_script</span> <span class="o">=</span> <span class="s1">&#39;disl_relax.in&#39;</span>
    <span class="n">template</span> <span class="o">=</span> <span class="n">iprPy</span><span class="o">.</span><span class="n">tools</span><span class="o">.</span><span class="n">read_calc_file</span><span class="p">(</span><span class="n">template_file</span><span class="p">,</span> <span class="n">filedict</span><span class="p">)</span>
    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">lammps_script</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
        <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">iprPy</span><span class="o">.</span><span class="n">tools</span><span class="o">.</span><span class="n">filltemplate</span><span class="p">(</span><span class="n">template</span><span class="p">,</span> <span class="n">lammps_variables</span><span class="p">,</span>
                                         <span class="s1">&#39;&lt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&gt;&#39;</span><span class="p">))</span>

    <span class="c1"># Run LAMMPS</span>
    <span class="n">output</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">lammps_command</span><span class="p">,</span> <span class="n">lammps_script</span><span class="p">,</span> <span class="n">mpi_command</span><span class="p">)</span>
    <span class="n">thermo</span> <span class="o">=</span> <span class="n">output</span><span class="o">.</span><span class="n">simulations</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="s1">&#39;thermo&#39;</span><span class="p">]</span>

    <span class="c1"># Extract output values</span>
    <span class="n">results</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="n">results</span><span class="p">[</span><span class="s1">&#39;logfile&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;log.lammps&#39;</span>
    <span class="n">results</span><span class="p">[</span><span class="s1">&#39;dumpfile&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">%i</span><span class="s1">.dump&#39;</span> <span class="o">%</span> <span class="n">thermo</span><span class="o">.</span><span class="n">Step</span><span class="o">.</span><span class="n">values</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
    <span class="n">results</span><span class="p">[</span><span class="s1">&#39;E_total&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="n">thermo</span><span class="o">.</span><span class="n">PotEng</span><span class="o">.</span><span class="n">values</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span>
                                         <span class="n">lammps_units</span><span class="p">[</span><span class="s1">&#39;energy&#39;</span><span class="p">])</span>

    <span class="k">return</span> <span class="n">results</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="3.4-anneal_info()">
<h4>3.4 anneal_info()<a class="headerlink" href="#3.4-anneal_info()" title="Permalink to this headline">¶</a></h4>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[14]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="k">def</span> <span class="nf">anneal_info</span><span class="p">(</span><span class="n">temperature</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">runsteps</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">randomseed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">units</span><span class="o">=</span><span class="s1">&#39;metal&#39;</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Generates LAMMPS commands for thermo anneal.</span>

<span class="sd">    Parameters</span>
<span class="sd">    ----------</span>
<span class="sd">    temperature : float, optional</span>
<span class="sd">        The temperature to relax at (default is 0.0).</span>
<span class="sd">    randomseed : int or None, optional</span>
<span class="sd">        Random number seed used by LAMMPS in creating velocities and with</span>
<span class="sd">        the Langevin thermostat.  (Default is None which will select a</span>
<span class="sd">        random int between 1 and 900000000.)</span>
<span class="sd">    units : str, optional</span>
<span class="sd">        The LAMMPS units style to use (default is &#39;metal&#39;).</span>

<span class="sd">    Returns</span>
<span class="sd">    -------</span>
<span class="sd">    str</span>
<span class="sd">        The generated LAMMPS input lines for performing a dynamic relax.</span>
<span class="sd">        Will be &#39;&#39; if temperature==0.0.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="c1"># Return nothing if temperature is 0.0 (don&#39;t do thermo anneal)</span>
    <span class="k">if</span> <span class="n">temperature</span> <span class="o">==</span> <span class="mf">0.0</span><span class="p">:</span>
        <span class="k">return</span> <span class="s1">&#39;&#39;</span>

    <span class="c1"># Generate velocity, fix nvt, and run LAMMPS command lines</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">randomseed</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">randomseed</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">900000000</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">runsteps</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">runsteps</span> <span class="o">=</span> <span class="mi">10000</span>

        <span class="n">start_temp</span> <span class="o">=</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">temperature</span>
        <span class="n">tdamp</span> <span class="o">=</span> <span class="mi">100</span> <span class="o">*</span> <span class="n">lmp</span><span class="o">.</span><span class="n">style</span><span class="o">.</span><span class="n">timestep</span><span class="p">(</span><span class="n">units</span><span class="p">)</span>
        <span class="n">timestep</span> <span class="o">=</span> <span class="n">lmp</span><span class="o">.</span><span class="n">style</span><span class="o">.</span><span class="n">timestep</span><span class="p">(</span><span class="n">units</span><span class="p">)</span>
        <span class="n">info</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span>
            <span class="s1">&#39;velocity move create </span><span class="si">%f</span><span class="s1"> </span><span class="si">%i</span><span class="s1"> mom yes rot yes dist gaussian&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">start_temp</span><span class="p">,</span> <span class="n">randomseed</span><span class="p">),</span>
            <span class="s1">&#39;fix nvt all nvt temp </span><span class="si">%f</span><span class="s1"> </span><span class="si">%f</span><span class="s1"> </span><span class="si">%f</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">temperature</span><span class="p">,</span> <span class="n">temperature</span><span class="p">,</span>
                                               <span class="n">tdamp</span><span class="p">),</span>
            <span class="s1">&#39;timestep </span><span class="si">%f</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">timestep</span><span class="p">),</span>
            <span class="s1">&#39;thermo </span><span class="si">%i</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">runsteps</span><span class="p">),</span>
            <span class="s1">&#39;run </span><span class="si">%i</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">runsteps</span><span class="p">),</span>
            <span class="p">])</span>

    <span class="k">return</span> <span class="n">info</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="4.-Run-calculation-function(s)">
<h3>4. Run calculation function(s)<a class="headerlink" href="#4.-Run-calculation-function(s)" title="Permalink to this headline">¶</a></h3>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">results_dict</span> <span class="o">=</span> <span class="n">dislocationmonopole</span><span class="p">(</span><span class="n">lammps_command</span><span class="p">,</span> <span class="n">ucell</span><span class="p">,</span> <span class="n">potential</span><span class="p">,</span> <span class="n">C</span><span class="p">,</span>
                                   <span class="n">burgers</span><span class="p">,</span> <span class="n">ξ_uvw</span><span class="p">,</span> <span class="n">slip_hkl</span><span class="p">,</span>
                                   <span class="n">mpi_command</span> <span class="o">=</span> <span class="n">mpi_command</span><span class="p">,</span>
                                   <span class="n">m</span> <span class="o">=</span> <span class="n">m</span><span class="p">,</span>
                                   <span class="n">n</span> <span class="o">=</span> <span class="n">n</span><span class="p">,</span>
                                   <span class="n">shift</span> <span class="o">=</span> <span class="n">shift</span><span class="p">,</span>
                                   <span class="n">shiftscale</span> <span class="o">=</span> <span class="n">shiftscale</span><span class="p">,</span>
                                   <span class="n">shiftindex</span> <span class="o">=</span> <span class="n">shiftindex</span><span class="p">,</span>
                                   <span class="n">sizemults</span> <span class="o">=</span> <span class="n">sizemults</span><span class="p">,</span>
                                   <span class="n">amin</span> <span class="o">=</span> <span class="n">amin</span><span class="p">,</span>
                                   <span class="n">bmin</span> <span class="o">=</span> <span class="n">bmin</span><span class="p">,</span>
                                   <span class="n">cmin</span> <span class="o">=</span> <span class="n">cmin</span><span class="p">,</span>
                                   <span class="n">etol</span> <span class="o">=</span> <span class="n">energytolerance</span><span class="p">,</span>
                                   <span class="n">ftol</span> <span class="o">=</span> <span class="n">forcetolerance</span><span class="p">,</span>
                                   <span class="n">maxiter</span> <span class="o">=</span> <span class="n">maxiterations</span><span class="p">,</span>
                                   <span class="n">maxeval</span> <span class="o">=</span> <span class="n">maxevaluations</span><span class="p">,</span>
                                   <span class="n">dmax</span> <span class="o">=</span> <span class="n">maxatommotion</span><span class="p">,</span>
                                   <span class="n">annealtemp</span> <span class="o">=</span> <span class="n">annealtemperature</span><span class="p">,</span>
                                   <span class="n">annealsteps</span> <span class="o">=</span> <span class="n">annealsteps</span><span class="p">,</span>
                                   <span class="n">randomseed</span> <span class="o">=</span> <span class="n">randomseed</span><span class="p">,</span>
                                   <span class="n">boundaryshape</span> <span class="o">=</span> <span class="n">boundaryshape</span><span class="p">,</span>
                                   <span class="n">boundarywidth</span> <span class="o">=</span> <span class="n">boundarywidth</span><span class="p">,</span>
                                   <span class="n">boundaryscale</span> <span class="o">=</span> <span class="n">boundaryscale</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[16]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">results_dict</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[16]:
</pre></div>
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
dict_keys([&#39;dumpfile_base&#39;, &#39;symbols_base&#39;, &#39;dislocation&#39;, &#39;dumpfile_disl&#39;, &#39;symbols_disl&#39;, &#39;E_total_disl&#39;])
</pre></div></div>
</div>
</div>
<div class="section" id="5.-Report-results">
<h3>5. Report results<a class="headerlink" href="#5.-Report-results" title="Permalink to this headline">¶</a></h3>
<div class="section" id="5.1-Define-units-for-outputting-values">
<h4>5.1 Define units for outputting values<a class="headerlink" href="#5.1-Define-units-for-outputting-values" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><p><strong>length_unit</strong> is the unit of length to display results in.</p></li>
<li><p><strong>energy_unit</strong> is the unit of energy to display cohesive energies in.</p></li>
<li><p><strong>energy_per_length_unit</strong> is the energy per length to report the pre logarithmic energy factor in.</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[17]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">length_unit</span> <span class="o">=</span> <span class="s1">&#39;angstrom&#39;</span>
<span class="n">energy_unit</span> <span class="o">=</span> <span class="s1">&#39;eV&#39;</span>
<span class="n">pressure_unit</span> <span class="o">=</span> <span class="s1">&#39;GPa&#39;</span>
<span class="n">energy_per_length_unit</span> <span class="o">=</span> <span class="n">energy_unit</span><span class="o">+</span><span class="s1">&#39;/&#39;</span><span class="o">+</span><span class="n">length_unit</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="5.2-Print-Stroh-method-parameters">
<h4>5.2 Print Stroh method parameters<a class="headerlink" href="#5.2-Print-Stroh-method-parameters" title="Permalink to this headline">¶</a></h4>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[18]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="nb">print</span><span class="p">(</span><span class="s1">&#39;pre-ln factor (alpha) =&#39;</span><span class="p">,</span> <span class="n">uc</span><span class="o">.</span><span class="n">get_in_units</span><span class="p">(</span><span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;dislocation&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">dislsol</span><span class="o">.</span><span class="n">preln</span><span class="p">,</span> <span class="n">energy_per_length_unit</span><span class="p">),</span> <span class="n">energy_per_length_unit</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;K_tensor =&#39;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">uc</span><span class="o">.</span><span class="n">get_in_units</span><span class="p">(</span><span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;dislocation&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">dislsol</span><span class="o">.</span><span class="n">K_tensor</span><span class="p">,</span> <span class="n">pressure_unit</span><span class="p">),</span> <span class="n">pressure_unit</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
pre-ln factor (alpha) = 0.38115202169620965 eV/angstrom
K_tensor =
[[ 81.07544348   0.         -12.76027037]
 [  0.         123.86918865   0.        ]
 [-12.76027037   0.         127.31323026]] GPa
</pre></div></div>
</div>
</div>
<div class="section" id="5.3-List-dump-files">
<h4>5.3 List dump files<a class="headerlink" href="#5.3-List-dump-files" title="Permalink to this headline">¶</a></h4>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[19]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Perfect system is saved as&#39;</span><span class="p">,</span> <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;dumpfile_base&#39;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Defect system is saved as&#39;</span><span class="p">,</span>  <span class="n">results_dict</span><span class="p">[</span><span class="s1">&#39;dumpfile_disl&#39;</span><span class="p">])</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Perfect system is saved as base.dump
Defect system is saved as disl.dump
</pre></div></div>
</div>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">dislocation_monopole calculation style</a><ul>
<li><a class="reference internal" href="#Introduction">Introduction</a><ul>
<li><a class="reference internal" href="#Version-notes">Version notes</a></li>
<li><a class="reference internal" href="#Additional-dependencies">Additional dependencies</a></li>
<li><a class="reference internal" href="#Disclaimers">Disclaimers</a></li>
</ul>
</li>
<li><a class="reference internal" href="#Method-and-Theory">Method and Theory</a><ul>
<li><a class="reference internal" href="#Stroh-theory">Stroh theory</a></li>
<li><a class="reference internal" href="#Orientation">Orientation</a></li>
<li><a class="reference internal" href="#Calculation-methodology">Calculation methodology</a></li>
</ul>
</li>
<li><a class="reference internal" href="#Demonstration">Demonstration</a><ul>
<li><a class="reference internal" href="#1.-Setup">1. Setup</a><ul>
<li><a class="reference internal" href="#1.1.-Library-imports">1.1. Library imports</a></li>
<li><a class="reference internal" href="#1.2.-Default-calculation-setup">1.2. Default calculation setup</a></li>
</ul>
</li>
<li><a class="reference internal" href="#2.-Assign-values-for-the-calculation’s-run-parameters">2. Assign values for the calculation’s run parameters</a><ul>
<li><a class="reference internal" href="#2.1.-Specify-system-specific-paths">2.1. Specify system-specific paths</a></li>
<li><a class="reference internal" href="#2.2.-Load-interatomic-potential">2.2. Load interatomic potential</a></li>
<li><a class="reference internal" href="#2.3.-Load-initial-unit-cell-system">2.3. Load initial unit cell system</a></li>
<li><a class="reference internal" href="#2.4-Specify-material-elastic-constants">2.4 Specify material elastic constants</a></li>
<li><a class="reference internal" href="#2.5-Specify-the-defect-parameters">2.5 Specify the defect parameters</a></li>
<li><a class="reference internal" href="#2.6-Specify-calculation-specific-run-parameters">2.6 Specify calculation-specific run parameters</a></li>
<li><a class="reference internal" href="#2.7.-Modify-system">2.7. Modify system</a></li>
</ul>
</li>
<li><a class="reference internal" href="#3.-Define-calculation-function(s)-and-generate-template-LAMMPS-script(s)">3. Define calculation function(s) and generate template LAMMPS script(s)</a><ul>
<li><a class="reference internal" href="#3.1.-disl_relax.template">3.1. disl_relax.template</a></li>
<li><a class="reference internal" href="#3.2.-dislocationmonopole()">3.2. dislocationmonopole()</a></li>
<li><a class="reference internal" href="#3.3.-disl_relax()">3.3. disl_relax()</a></li>
<li><a class="reference internal" href="#3.4-anneal_info()">3.4 anneal_info()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#4.-Run-calculation-function(s)">4. Run calculation function(s)</a></li>
<li><a class="reference internal" href="#5.-Report-results">5. Report results</a><ul>
<li><a class="reference internal" href="#5.1-Define-units-for-outputting-values">5.1 Define units for outputting values</a></li>
<li><a class="reference internal" href="#5.2-Print-Stroh-method-parameters">5.2 Print Stroh method parameters</a></li>
<li><a class="reference internal" href="#5.3-List-dump-files">5.3 List dump files</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="dislocation_SDVPN.html"
                        title="previous chapter">dislocation_SDVPN calculation style</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="dislocation_periodic_array.html"
                        title="next chapter">dislocation_periodic_array calculation style</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dislocation_periodic_array.html" title="dislocation_periodic_array calculation style"
             >next</a> |</li>
        <li class="right" >
          <a href="dislocation_SDVPN.html" title="dislocation_SDVPN calculation style"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">iprPy 0.10.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../notebook_styles.html" >Jupyter Demonstration Notebooks</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2.
    </div>
  </body>
</html>